package com.gitee.wsl.doc.prosemirror.transform.ext

import com.gitee.wsl.doc.prosemirror.model.fragment.Fragment
import com.gitee.wsl.doc.prosemirror.model.node.Node
import com.gitee.wsl.doc.prosemirror.transform.TransformAble


// Insert the given content at the given position.
fun<T: TransformAble> T.insert(pos: Int, content: Fragment) = this.replaceWith(pos, pos, content)
fun<T: TransformAble> T.insert(pos: Int, content: Node) = this.replaceWith(pos, pos, content)
fun<T: TransformAble> T.insert(pos: Int, content: List<Node>) = this.replaceWith(pos, pos, content)